/**身份证管理-身份证管理PI**/
import obj from '@/utils/request'

let {request, baseURL} = obj

//查询所有身份证信息
export function getCardInfo(params) {
  return request({
    url: '/cardInfo',
    method: 'get',
    params
  })
}

//添加身份证信息
export function addCardInfo(data) {
  return request({
    url: '/cardInfo',
    method: 'post',
    data
  })
}

//修改身份证信息
export function modCardInfo(data) {
  return request({
    url: '/cardInfo',
    method: 'put',
    data
  })
}

//删除身份证信息
export function delCardInfo(data) {
  return request({
    url: '/cardInfo',
    method: 'delete',
    data
  })
}

//查询单条身份证信息
export function getCardInfoById(id) {
  return request({
    url: '/cardInfo/' + id,
    method: 'get',
  })
}

//根据收件人和客户号查询单条身份证信息
export function getCardInfoByReceiver(params) {
  return request({
    url: '/cardInfo/receiver',
    method: 'get',
    params
  })
}

//禁用启用身份证
export function disableOrEnableCardInfo(cards, params) {
  return request({
    url: '/cardInfo/disableOrEnable',
    method: 'put',
    data: cards,
    params
  })
}

//复制运单
export function copyCardInfo(id, orders) {
  return request({
    url: '/cardInfo/copy/' + id,
    method: 'post',
    data: orders
  })
}


export function ocrCardImage(data) {
  return request({
    url: '/cardInfo/ocr',
    method: 'post',
    data
  })
}

export function batchUploadCardImage(customerNum,data) {
  return request({
    url: '/cardInfo/batch?customerNum=' + customerNum,
    method: 'post',
    data
  })
}
